document.addEventListener('DOMContentLoaded', function () {
    const uploadCorrectInput = document.getElementById('upload-correct-input');
    const uploadGtInput = document.getElementById('upload-gt-input');
    const predictButton = document.getElementById('predict-button');
    const originalImage = document.getElementById('original-image');
    const classifiedImage = document.getElementById('classified-image');
    const loadingIndicator = document.getElementById('loading-indicator');
    const downloadSection = document.getElementById('download-section');

    // 处理上传correct图片
    uploadCorrectInput.addEventListener('change', function () {

        console.log('选择了correct图片');
    });

    // 处理上传gt图片
    uploadGtInput.addEventListener('change', function () {

        console.log('选择了gt图片');
    });

    // 点击预测按钮逻辑
    predictButton.addEventListener('click', function () {
        // 显示加载指示器
        loadingIndicator.style.display = 'block';
        // 模拟获取原始图片和分类图片的延迟
        setTimeout(function () {
            
            originalImage.src = 'path/to/original-image.jpg';
            classifiedImage.src = 'path/to/classified-image.jpg';
            // 隐藏加载指示器
            loadingIndicator.style.display = 'none';
            // 显示下载按钮（假设用户已登录）
            downloadSection.style.display = 'flex';
        }, 3000);
    });

    // 模拟下载图像功能
    document.getElementById('download-image-button').addEventListener('click', function () {
        // 下载逻辑
        console.log('下载图像');
    });

    // 模拟下载数据功能
    document.getElementById('download-data-button').addEventListener('click', function () {
        // 下载逻辑
        console.log('下载数据');
    });
});